<%@ page import="com.weixinli.beans.DetailInfo"%>
<%@ page import="com.weixinli.utils.SessionAttributeName"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!doctype html>
<html><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="title" -->
<title>个人中心</title>

<link rel="stylesheet" type="text/css" href="../css/index.css">
<link rel="shortcut icon" type="text/css" href="../images/favicon.ico"/>
<link href="css/per.css" rel="stylesheet" type="text/css">
<!-- InstanceEndEditable -->
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="../js/ajaxfileupload.js"></script>
<script type="text/javascript" src="../js/showpic.js"></script>
<script src="js/per.js"></script>
</head>

<body>
<!--头部开始-->
<div class="header">
    <div class="logo">
        <a href="../index.html"><img src="../images/logo.png"></a>
    </div>
    <div class="nav">
         <ul>
           	<li><a href="../index.jsp" class="tit">首页</a></li>
            <li><a href="../FM/FM.jsp" class="tit">心理FM</a></li>
            <li><a href="moods.jsp" class="tit">心情说</a></li>
            <li><a href="../article/article.jsp" class="tit">杂志</a></li>
            <li><a href="../test/test.jsp" class="tit">测试</a></li>
            <li><a href="../smile/smile.jsp" class="tit">微笑墙</a></li>
        </ul>
    </div>
    <div class="reg">
        <ul>
            <c:if test="${empty sessionScope.currentUser}">
	            <li><a href="../login/login.html">登录</a></li>
	            <li><span class="line"></span></li>
	            <li><a href="../reg/reg.html">注册</a></li>
	       	</c:if>
	       	<c:if test="${!empty sessionScope.currentUser}">
	       		<li id="myli"><span>欢迎您</span>[<a href="../userServlet?op=getPerInfo" style="color:yellow;font-size:12px;">${sessionScope.currentUser.w_email}</a>]
		       		<span id="myspan"></span>
		       		<div id="current_userInfo">
		       			<dl>
		       				<dd><a href="per.jsp">个人中心</a></dd>
		       				<dd><a href="publish.jsp">发表说说</a></dd>
		       				<dd><a href="#">我的通知</a></dd>
		       				<dd><a href="../exit.jsp">退&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;出</a></dd>
		       			</dl>
		       		</div>
	       		</li>
	       	</c:if>
        </ul>
    </div>
    <div class="sear">
        <form target="_blank" action="" method="get">
            <input type="text" class="text" name="sear" placeholder="搜索" />
            <input type="submit" class="submit" value="&#10140;"/>
        </form>
    </div>
</div>
<!--头部结束-->
<!-- InstanceBeginEditable name="content" -->
<article>
    	<div class="per_left">
        	<div class="per_info">
                <div class="per_info_left">
                	<img src="images/logo.jpg">
                    <ul>
                        <li>
                        	<h4>${sessionScope.moodNum }</h4>
                        	<h2>心情</h2>
                        </li>
                        <li>
                        	<h4>${sessionScope.testNum }</h4>
                        	<h2>测试</h2>
                        </li>
                    </ul>
                </div>
                <div class="per_info_right">
                	<p style="margin-top:30px; font-size:12px;"><a href="javascript:Revised()">修改资料 >></a></p>
                	<input type="hidden" id="w_uid" value="${sessionScope.userDetailInfo.w_uid }">
                	<ul>
                		<c:choose>  
							<c:when test="${sessionScope.userDetailInfo != null }">
								<li><span>昵称：</span>${sessionScope.userDetailInfo.uname }<input type="hidden" id="uname" value="${sessionScope.userDetailInfo.uname }"></li>
                        		<li><span>简介：</span> ${sessionScope.userDetailInfo.intro }<input type="hidden" id="intro" value="${sessionScope.userDetailInfo.intro }"></li>
							</c:when>  
							<c:otherwise>
								<li>昵称：用户</li>
                        		<li>简介：暂无</li>
							</c:otherwise>  
						</c:choose>                    	
                    </ul>
                </div>
            </div>
            <div class="per_nav">
            	<ul>
                	<li><a href="../userServlet?op=getPerInfo">主页</a></li>
                    <li><a>心情</a></li>
                    <li><a>测试</a></li>
                </ul>
            </div>
            <div class="per_content">
            	<p>测试记录</p>
            	<ul>
            		<c:forEach items="${sessionScope.userTestDetailInfo }" var="test">
		                <li>
		                	<c:choose>
		                		<c:when test="${!empty test.timg }">
		                			<img src="../${test.timg }" style="float:left;height:100px; width:150px;"/>
		                		</c:when>
		                		<c:otherwise>
		                			<img src="images/placeholder.jpg" style="float:left;height:100px; width:150px;"/>
		                		</c:otherwise>
		                	</c:choose>
		                    <div style="width:60%;height:100%;float:left;">
		                    	<br />
		                    	<p><a class="test_title">${test.tname }</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="test_tag">${test.ttype }</span></p>
		                        <p style="font-size:12px">${test.tdec }</p>
		                    </div>
		                </li>
	                </c:forEach>
                </ul>
            </div>
        </div>
        <div class="per_right">
        	<div class="per_menu">
            	<p><a href="publish.jsp">前往发表心情</a></p>
            </div>
            <div class="per_article">
            	<p>最新文章</p>
                <div>
                	<ul>
                		<c:forEach items="${sessionScope.bookInfo }" var="book">
	                    	<li>
	                    		<c:choose>
			                		<c:when test="${!empty book.aaddr }">
			                			<img src="../${book.aaddr }" style="width:75px; height:50px;"/>
			                		</c:when>
			                		<c:otherwise>
			                			<img src="images/placeholder.jpg" style="width:75px; height:50px;"/>
			                		</c:otherwise>
			                	</c:choose>
	                           	<div>
	                            	<p><a>${book.aname }</a></p>
	                            	<p><a>${book.aauthor }</a></p>
	                            </div>
	                        </li>
                        </c:forEach>
                        <!--
                        <li>
                        	<img src="images/placeholder.jpg" style="width:75px; height:50px;"/>
                           	<div>
                            	<p><a>书名</a></p>
                            	<p><a>作者</a></p>
                            </div>
                        </li>
                        <li>
                        	<img src="images/placeholder.jpg" style="width:75px; height:50px;"/>
                           	<div>
                            	<p><a>书名</a></p>
                            	<p><a>作者</a></p>
                            </div>
                        </li>
                        <li>
                        	<img src="images/placeholder.jpg" style="width:75px; height:50px;"/>
                           	<div>
                            	<p><a>书名</a></p>
                            	<p><a>作者</a></p>
                            </div>
                        </li>
                        -->
                    </ul>
                </div>
            </div>
        </div>
    </article>
<!-- InstanceEndEditable -->
<!--内容部分结束-->
<div id="footer">
  <div id="footer_content">
       	<div id="nav">
            <ul>
                <li><a href="#">关于我们</a></li>
                <li><a href="#">加入我们</a></li>
                <li><a href="#">联系我们</a></li>
                <li><a href="#">免责声明</a></li>
                <li><a href="#">友情链接</a></li>
                <li><a href="#">网站地图</a></li>
                <li><a href="#">手机版</a></li>
                <li><a href="#">手机应用</a></li>
                <li><a href="#" style="display: none">投稿</a></li>
            </ul>
        </div>
        <div id="links">
            <span>友情链接：</span>
            <ul>
                <li><a target="_blank" href="http://www.nlp.cn/">NLP心理学</a></li>
                <li><a target="_blank" href="http://zhidao.baidu.com/daily/">百度知道日报</a></li>
                <li><a target="_blank" href="http://iask.fh21.com.cn/">飞华问医生</a></li>
                <li><a target="_blank" href="http://www.dxsbb.com/">大学生网</a></li>
                <li><a target="_blank" href="http://yuwen.chazidian.com/">语文网</a></li>
                <li><a target="_blank" href="http://tag.120ask.com/"> 有问必答知识库</a></li>
                <li><a target="_blank" href="http://www.xinli001.com/zx/">心理咨询</a></li>
                <li><a target="_blank" href="http://wannianli.tianqi.com/">天气网</a></li>
                <li><a target="_blank" href="http://www.pm25.com/">绿色呼吸</a></li>
                <li><a target="_blank" href="http://www.vmovier.com/">V电影</a></li>
                <li><a target="_blank" href="http://iask.sina.com.cn/c/79.html ">爱问健康</a></li>
            </ul>
        </div>
        <div id="copyright">
            <div id="footer_1">
                &copy; 2015 All Rights Reserved. <a target="_blank" href="http://www.miibeian.gov.cn/">粤ICP备12051153号</a>
            </div>
            <div id="footer_2">
                <a href="#">
                    <img src="../images/footer_pic1.png" align="absmiddle" />
                </a>
                <a href="#">
                    <img src="../images/footer_pic2.png" align="absmiddle" />
                </a>
            </div>
        </div>
    </div>
</div>
<div class="user_info1"></div>
 <div class="user_info2">
 		<img class="log_user_info_del" src="../FM/images/log_del.jpg"/><br/>
 		<p class="moodPer">修改信息</p>
 		<center>
    	<from class="moodFrom" action="" method="">
			<p><label for="nc">昵称：</label><input id="nc" type="text" class="moodText1" maxlength="30"/></p>
			<p><label for="up">头像：</label><input id="up" type="file" class="moodText2" onchange="previewMultipleImage(this,'mooddiv1')"/></p>
			<div id="mooddiv1"></div>
			<p><label>自我简介：</label></p>
			<p><textarea class="moodText3" maxlength="100"></textarea></p><br/>			
    		<input type="button" name="Moodusers" value="修改" class="Moodbutton" onclick="Detail()"/>
    	</from>
    	</center>
</div>
</body>
<!-- InstanceEnd -->
</html>
